package com.zuoqi;

import com.zuoqi.config.sitemesh.MySiteMeshFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import javax.servlet.Filter;

@SpringBootApplication
@ComponentScan(basePackages = "com.zuoqi")
@ServletComponentScan//@WebFilter 生效
public class EasyworkApplication {

	public static void main(String[] args) {
		SpringApplication.run(EasyworkApplication.class, args);
	}

	@Bean
	public Filter sitemeshFilter() {
		return new MySiteMeshFilter();
	}
}
